# -*- coding: utf-8 -*-
# @Time     : 2021/12/1 13:51
# @Author   : wljess
# @File     : 线程创建.py
# @Describe : 
# @Software : PyCharm

import time
from threading import Thread


def task():
    print("task is running...")
    time.sleep(1)
    print(10 + 20)


if __name__ == '__main__':
    t = Thread(target=task)
    t.start()  # 开启一个线程的速度非常快
    time.sleep(0.5)
    print("主线程运行结束...")

